import type { Route } from '../index.type'
import Layout from '@/layout/index.vue'
import { createNameComponent } from '../createNode'
const route: Route[] = [
  {
    path: '/student',
    component: Layout,
    redirect: '/student/home',
    meta: { title: 'message.menu.student.name'},
    children: [
      {
        path: 'home',
        component: createNameComponent(() => import('@/views/main/student/home/index.vue')),
        meta: { title: 'message.menu.student.home', cache: true  }
      },
      {
        path: 'info',
        component: createNameComponent(() => import('@/views/main/student/info/index.vue')),
        meta: { title: 'message.menu.student.info', cache: true  }
      },
      {
        path: 'joinCourse',
        component: createNameComponent(() => import('@/views/main/public/publicPage/joinCourse.vue')),
        meta: { title: 'message.menu.student.joinCourse'  }
      },
      {
        path: 'courseDetail',
        name: 'studentCourseDetail',
        component: createNameComponent(() => import('@/views/main/teacher/home/courseDetail/index.vue')),
        meta: { title: 'message.menu.student.courseDetail'}
      },
      {
        path: 'taskInfo',
        name: 'studentTaskInfo',
        component: createNameComponent(() => import('@/views/main/teacher/home/courseDetail/task/taskInfo.vue')),
        meta: { title: 'message.menu.student.taskInfo'  }
      },
      {
        path: 'homework',
        name: 'studentTask',
        component: createNameComponent(() => import('@/views/main/task/index.vue')),
        meta: { title: 'message.menu.student.homework' , showHeader: false }
      },
    ]
  }
]

export default route